<?php
// +----------------------------------------------------------------------
// | 后台应用路由
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('login','PublicController/login');
Route::post('login/post','PublicController/loginPost');
Route::get('/','Dashboard/index')->middleware(app\admin\middleware\Auth::class);
Route::get('index','Dashboard/index')->middleware(app\admin\middleware\Auth::class);

Route::group('sys', function(){
    Route::get('user/index','SysUser/index');
    Route::get('user/info','SysUser/info');
    Route::post('user/add','SysUser/add');
    Route::post('user/edit','SysUser/edit');
    Route::get('user/delete','SysUser/delete');
    Route::post('user/change/password','SysUser/changePassword');
    Route::get('user/logout','SysUser/logout');

    Route::get('role/index','SysRole/index');
    Route::get('role/info','SysRole/info');
    Route::post('role/add','SysRole/add');
    Route::post('role/edit','SysRole/edit');
    Route::get('role/delete','SysRole/delete');
    Route::post('role/authorize','SysRole/authorize');
    Route::get('role/permissions','SysRole/permissions');
    
    Route::get('menu/index','SysMenu/index');
    Route::get('menu/info','SysMenu/info');
    Route::post('menu/add','SysMenu/add');
    Route::post('menu/edit','SysMenu/edit');
    Route::get('menu/delete','SysMenu/delete');

    Route::get('post/index','SysPost/index');
    Route::get('post/info','SysPost/info');
    Route::post('post/add','SysPost/add');
    Route::post('post/edit','SysPost/edit');
    Route::get('post/delete','SysPost/delete');

    Route::get('dept/index','SysDept/index');
    Route::get('dept/info','SysDept/info');
    Route::post('dept/add','SysDept/add');
    Route::post('dept/edit','SysDept/edit');
    Route::get('dept/delete','SysDept/delete');
})->middleware(app\admin\middleware\Auth::class);


    

